<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<title>购物车页面</title>

		<link href="${basePath!}/static/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="${basePath!}/static/basic/css/demo.css" rel="stylesheet" type="text/css" />
		<link href="${basePath!}/static/css/cartstyle.css" rel="stylesheet" type="text/css" />
		<link href="${basePath!}/static/css/optstyle.css" rel="stylesheet" type="text/css" />

		<script type="text/javascript" src="${basePath!}/static/js/jquery.js"></script>

	</head>

	<body>

		<!--顶部导航条 -->
		<div class="am-container header">
			<ul class="message-l">
				<div class="topMessage">
					<div class="menu-hd">
						<#if (userInfo)??>
							欢迎您,<a href="${basePath!}/shopping/personal/center/personalCenter.do" target="_top" class="h" style="color:red;">${userInfo.userName}</a>
						<#else>
							<a href="${basePath!}/login.do" target="_top" class="h">亲，请登录</a>
							<a href="#" target="_top">免费注册</a>
						</#if>
					</div>
				</div>
			</ul>
			<ul class="message-r">
				<div class="topMessage home">
					<div class="menu-hd"><a href="${basePath!}/index.do" target="_top" class="h">商城首页</a></div>
				</div>
				<div class="topMessage my-shangcheng">
					<div class="menu-hd MyShangcheng"><a href="${basePath!}/shopping/personal/center/personalCenter.do" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
				</div>
				<div class="topMessage mini-cart">
					<div class="menu-hd"><a id="mc-menu-hd" href="${basePath!}/shopping/personal/center/personalShopcart.do" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span>(<strong class="h" style="color:red;">${shopcartGoodsCount}</strong>)</a></div>
				</div>
				<div class="topMessage favorite">
					<div class="menu-hd"><a href="${basePath!}/shopping/personal/center/personalCollection.do" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
			</ul>
			</div>

			<!--悬浮搜索框-->

			<div class="nav white">
				<div class="logo"><img src="http://p2s9wr3uo.bkt.clouddn.com/logo.png" /></div>
				<div class="logoBig">
					<li><img src="http://p2s9wr3uo.bkt.clouddn.com/logobig.png" /></li>
				</div>

				<div class="search-bar pr">
					<a name="index_none_header_sysc" href="#"></a>
					<form action="${basePath!}/shopping/search/goods.do" method="get">
						<input id="searchInput" name="goodsName" type="text" placeholder="搜索" value="${classificationDetailName!}" autocomplete="off">
						<input id="ai-topsearch" class="submit am-btn"  value="搜索" index="1" type="submit">
					</form>
				</div>
			</div>

			<div class="clear"></div>

			<!--购物车 -->
			<div class="concent">
				<div id="cartTable">
					<h4 style="text-align:center;color:red;font-size:12px;">${errorMsg!}</h4>
					<h4 style="text-align:center;color:green;font-size:12px;">${successfulMsg!}</h4>
									
					<div class="cart-table-th">
						<div class="wp">
							<div class="th th-chk">
								<div id="J_SelectAll1" class="select-all J_SelectAll">

								</div>
							</div>
							<div class="th th-item">
								<div class="td-inner">商品信息</div>
							</div>
							<div class="th th-price">
								<div class="td-inner">单价</div>
							</div>
							<div class="th th-amount">
								<div class="td-inner">数量</div>
							</div>
							<div class="th th-op">
								<div class="td-inner">操作</div>
							</div>
						</div>
					</div>
					<div class="clear"></div>
					
					<#list shopcartList as item>
						
						<tr class="item-list">
							<div class="bundle  bundle-last ">
								<div class="bundle-main">
									<ul class="item-content clearfix">
										<li class="td td-chk">
											<div class="cart-checkbox ">
												<#if item.selected>
													<input class="check" type="checkbox" checked="checked" onclick="updateShopcartSelected('${item.id}')">
												<#else>
													<input class="check" type="checkbox" onclick="updateShopcartSelected('${item.id}')">
												</#if>
											</div>
										</li>
										<li class="td td-item">
											<div class="item-pic">
												<a href="${basePath!}/shopping/goods/introduction/goodsIntroduction.do?goodsId=${item.goodsIntroduction.id}" target="_blank" data-title="${item.goodsIntroduction.goodsName}" class="J_MakePoint" data-point="tbcart.8.12">
													<img src="${item.goodsIntroduction.banner}" class="itempic J_ItemImg"></a>
											</div>
											<div class="item-info">
												<div class="item-basic-info">
													<a href="${basePath!}/shopping/goods/introduction/goodsIntroduction.do?goodsId=${item.goodsIntroduction.id}" target="_blank" title="${item.goodsIntroduction.goodsName}" class="item-title J_MakePoint" data-point="tbcart.8.11">${item.goodsIntroduction.goodsName}</a>
												</div>
											</div>
										</li>
										<li class="td td-info">
											<div class="item-props">
												<#list item.goodsIntroduction.goodsAttributes as attrItem>
													<#list attrItem.attributes as attributeItem>
														<#if attributeItem.defaultSelected>
															<span class="sku-line">${attrItem.attributeType}：${attributeItem.name}</span>
														</#if>
													</#list>
												</#list>
											</div>
										</li>
										<li class="td td-price">
											<div class="item-price price-promo-promo">
												<div class="price-content">
													<div class="price-line">
														<em class="price-original"><b>¥</b>${(item.goodsIntroduction.unitPrice/100)?string('#.##')}</em>
													</div>
													<div class="price-line">
														<em class="J_Price price-now" tabindex="0"><b>¥</b>${(item.goodsIntroduction.promotionUnitPrice/100)?string('#.##')}</em>
													</div>
												</div>
											</div>
										</li>
										<li class="td td-amount">
											<div class="amount-wrapper ">
												<div class="item-amount ">
													<div class="sl">
														<a class="add am-btn" href="${basePath!}/shopping/buyer/addShopcart.do?shopcartId=${item.id}&count=-1">-</a>
														<input class="text_box" name="" type="text" value="${item.quantity}" style="width:30px;" />
														<a class="add am-btn" href="${basePath!}/shopping/buyer/addShopcart.do?shopcartId=${item.id}&count=1">+</a>
													</div>
												</div>
											</div>
										</li>
										<li class="td td-op">
											<div class="td-inner">
												<a title="移入收藏夹" class="btn-fav" href="#">移入收藏夹</a>
												<a href="${basePath!}/shopping/buyer/removeShopcart.do?shopcartId=${item.id}" data-point-url="#" class="delete"> 删除</a>
											</div>
										</li>
									</ul>
									
								</div>
							</div>
						</tr>
					
					</#list>
					

					
					<div class="clear"></div>

				</div>
				<div class="clear"></div>

				<div class="float-bar-wrapper">
					<div class="float-bar-right">
						<div class="amount-sum">
							<span class="txt">已选商品</span>
							<em id="J_SelectedItemsCount">${selectedCount}</em><span class="txt">件</span>
							<div class="arrow-box">
								<span class="selected-items-arrow"></span>
								<span class="arrow"></span>
							</div>
						</div>
						<div class="price-sum">
							<span class="txt">合计:</span>
							<strong class="price">¥<em id="J_Total">${(selectedGoodsPrice/100)?string('#.##')}</em></strong>
						</div>
						<div class="btn-area">
							<a href="${basePath!}/shopping/personal/center/personalPay.do" id="J_Go" class="submit-btn submit-btn-disabled" aria-label="请注意如果没有选择宝贝，将无法结算">
								<span>结&nbsp;算</span></a>
						</div>
					</div>

				</div>
				
				<script>
					function updateShopcartSelected(shopcartId){
						window.location.href="${basePath!}/shopping/buyer/updateShopcartSelected.do?shopcartId="+shopcartId;
					}
				</script>

				${copyrightStatement}

			</div>

			<!--操作页面-->
		<!--引导 -->
		<div class="navCir">
			<li><a href="home.html"><i class="am-icon-home "></i>首页</a></li>
			<li><a href="sort.html"><i class="am-icon-list"></i>分类</a></li>
			<li class="active"><a href="shopcart.html"><i class="am-icon-shopping-basket"></i>购物车</a></li>	
			<li><a href="person/index.html"><i class="am-icon-user"></i>我的</a></li>					
		</div>
	</body>

</html>